/**
 * Copyright © 2013 Creativor Studio.
 * About license information, please see LICENSE.txt.
 */
package org.creativor.rayson.serialize;

import java.io.DataInput;
import java.io.DataOutput;

/**
 * @author creativor
 * 
 */
final class NullType extends SerializableType<Object> {

	/**
	 * @param type
	 */
	protected NullType(final byte type) {
		super(type);
	}

	@Override
	public Object read(final DataInput dis) throws SerializeFormatException {
		return null;
	}

	@Override
	Object readArray(final DataInput dis, final int arrayLength) {
		return null;
	}

	@Override
	public void write(final DataOutput dos, final Object value) {
		// Do nothing.
	}

	@Override
	void writeArray(final DataOutput dos, final Object array) {
		// Do nothing.
	}
}